package edu.zzuli.test.service.impl;


import edu.zzuli.test.dao.UserMapper;
import edu.zzuli.test.pojo.User;
import edu.zzuli.test.pojo.UserExample;
import edu.zzuli.test.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Chen-D.W on 2017/12/30.
 */
@Service("userServiceImpl")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> getUserList() {
        UserExample example=new UserExample();
        List<User> userList= userMapper.selectByExample(example);
        return userList;
    }

    @Override
    public void createUser(User user) {
        userMapper.insert(user);
    }
}
